package com.designpatterns.factory.factory2.pizzaStroe;

import com.designpatterns.factory.factory2.pizza.Pizza;
import com.designpatterns.factory.factory2.pizza.chiago.ChiagoStyleCheesePizza;
import com.designpatterns.factory.factory2.pizza.chiago.ChiagoStyleClamPizza;
import com.designpatterns.factory.factory2.pizza.chiago.ChiagoStylePepperoniPizza;
import com.designpatterns.factory.factory2.pizza.chiago.ChiagoStyleVeggiePizza;

/**
 * @author Brook
 */
public class ChiagoStylePizzaStroe extends PizzaStroe{
    @Override
    public Pizza createPizza(String type) {
        if("cheese".equals(type)){
            return new ChiagoStyleCheesePizza();
        } else if("veggie".equals(type)) {
            return new ChiagoStyleVeggiePizza();
        } else if("clam".equals(type)){
            return new ChiagoStyleClamPizza();
        } else if("pepperoni".equals(type)) {
            return new ChiagoStylePepperoniPizza();
        }
        return null;
    }
}
